#include <bits/stdc++.h>
using namespace std;

int main()
{
    string ret, s;
    cin >> s;

    int n = s.size();
    for (int i = 0; i < n; i++)
    {
        ret += s[i];
        if ((n - i - 1) % 3 == 0 && i != n - 1) ret += ',';
    }
    cout << ret << endl;
    return 0;
}